<!--资费核实-->
<template>
  <div class="tariff-verification-box pending-task">
    <el-form
        ref="TcForm2"
        label-position="left"
        label-width="1.5rem"
        :model="Form"
    >
      <el-row>
        <tc-form2 :form="Form"  :star-index=0 :end-index=1>
        </tc-form2>
      </el-row>
      <h2 class="ne-title-v2">资源调查信息</h2>
      <el-row>
        <tc-form2 :form="Form"  :star-index=1 :end-index=39>
        </tc-form2>
      </el-row>
      <h2 class="ne-title-v2">接应地客户经理信息</h2>
      <el-row>
        <tc-form2 :form="Form"  :star-index=39 :end-index=42>
        </tc-form2>
        <el-col :span="24" class="text-center">
            <el-button type="primary" size="medium" @click="submitFun">保存</el-button>
            <el-button size="medium" @click="closeFun">取消</el-button>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import TcForm2 from "@/components/public/TcForm2";
import requestUtil from '@/utils/requestEnc';
import CustOrderService from "@/api/order/CustOrderService";
import { mapState } from "vuex";
import custOrderDetail from '@/mixins/custorder/custOrderDetail';
export default {
  name: "TariffVerification",
  mixins: [custOrderDetail],
  data() {
    return {
      Form: {
        "4485-141000044": {
          type: 'Ipt',
          name: '节点名称',
          fieldId: "NODE_NAME",
          tableName: "ORDER_TASK",
          colId: "NODE_NAME",
          colType: "C",
          value: "北京(CE)5",
          attrRoleCd: "0",
          id: "4485-141000044",
          show: true,
          span: 6
        },
        "4709-100013696": {
          name: '接入方式',
          type: 'select',
          attrRoleCd: "0",
          colId: "NODE_NAME",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "NODE_NAME",
          value: "",
          id: "4709-100013696",
          options: [{label: '实线接入', value: '80050060002'}, {label: '光纤接入', value: '80050060003'}, {
            label: '其他接入',
            value: '80050060004'
          }],
          required: false,
          show: true,
          span: 6,
        },
        "4709-100013336": {
          name: '接入类别',
          type: 'select',
          attrRoleCd: "0",
          colId: "100013336",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "SOURCE_INPUT_TYPE",
          value: "",
          id: "4709-100013336",
          options: [{label: 'DDN', value: '0907130001'}, {label: 'ATM', value: '0907130002'}, {
            label: 'FR',
            value: '0907130003'
          }, {label: 'SDH', value: '0907130004'}, {label: '以太网', value: '0907130005'}, {
            label: 'MSTP',
            value: '0907130006'
          }],
          required: false,
          show: true,
          span: 6,
         marginRight:'50%'
        },
        "4709-100012584": {
          name: '端口来源',
          type: 'select',
          attrRoleCd: "0",
          colId: "100012584",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "PORT_SOURCE",
          value: "",
          id: "4709-100012584",
          options: [{label: '新开端口', value: '80060008001'}, {label: '原有端口', value: '80060008002'}],
          required: false,
          show: true,
          span: 6,
        },
        "4709-100012344": {
          type: 'Ipt',
          name: '局向',
          attrRoleCd: "0",
          colId: "100012344",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "SOURCE_DIRECT",
          value: "",
          id: "4709-100012344",
          show: true,
          span: 6,
         marginRight:'50%'
        },
        "4709-100012871": {
          name: '是否需租用第三方资源',
          type: 'select',
          attrRoleCd: "0",
          colId: "100012871",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "THR_RES_FLAG",
          value: "",
          id: "4709-100012871",
          options: [{label: '是', value: '1'}, {label: '否', value: '0'}],
          required: false,
          show: true,
          span: 6,
        },
        "4709-100013698": {
          type: 'Ipt',
          name: '出租方',
          attrRoleCd: "0",
          colId: "100013698",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "LESSOR",
          value: "",
          id: "4709-100013698",
          show: true,
          span: 6
        },
        "4709-100013699": {
          type: 'Ipt',
          name: '租用段落/设备',
          attrRoleCd: "0",
          colId: "100013699",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "DEVICE",
          value: "",
          id: "4709-100013699",
          show: true,
          span: 6,
         marginRight:'25%'
        },
        "4709-100013700": {
          name: '接入局上联中继资源',
          type: 'select',
          attrRoleCd: "0",
          colId: "100013700",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "TRUNKRESOURCE",
          value: "",
          id: "4709-100013700",
          options: [{label: '具备', value: '9005001'}, {label: '不具备', value: '9005002'}],
          required: false,
          show: true,
          span: 6,
        },
        "4709-100013704": {
          type: 'Ipt',
          name: '预计工期(工作日)',
          attrRoleCd: "0",
          colId: "100013704",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "TRUNKDATE",
          value: "",
          id: "4709-100013704",
          show: true,
          span: 6
        },
        "4709-100013708": {
          type: 'Ipt',
          name: '备注',
          attrRoleCd: "0",
          colId: "100013708",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "TRUNKNOTE",
          value: "",
          id: "4709-100013708",
          show: true,
          span: 6,
         marginRight:'25%'
        },
        "4709-100013701": {
          name: '接入局设备资源(含端口)',
          type: 'select',
          attrRoleCd: "0",
          colId: "100013701",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "DEVICERESOURCE",
          value: "",
          id: "4709-100013701",
          options: [{label: '具备', value: '9005001'}, {label: '不具备', value: '9005002'}],
          required: false,
          show: true,
          span: 6,
        },
        "4709-100013705": {
          type: 'Ipt',
          name: '预计工期(工作日)',
          attrRoleCd: "0",
          colId: "100013705",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "DEVICEDATE",
          value: "",
          id: "4709-100013705",
          show: true,
          span: 6
        },
        "4709-100013709": {
          type: 'textarea',
          name: '备注',
          attrRoleCd: "0",
          colId: "100013709",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "DEVICENOTE",
          value: "",
          id: "4709-100013708",
          show: true,
          span: 6,
         marginRight:'25%'
        },
        "4709-100013702": {
          name: '外线资源',
          type: 'select',
          attrRoleCd: "0",
          colId: "100013702",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "OUTSIDERESOURCE",
          value: "",
          id: "4709-100013702",
          options: [{label: '具备', value: '9005001'}, {label: '不具备', value: '9005002'}],
          required: false,
          show: true,
          span: 6,
        },
        "4709-100013706": {
          type: 'Ipt',
          name: '预计工期(工作日)',
          attrRoleCd: "0",
          colId: "100013706",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "OUTSIDEDATE",
          value: "",
          id: "4709-100013706",
          show: true,
          span: 6
        },
        "4709-100013710": {
          type: 'textarea',
          name: '备注',
          attrRoleCd: "0",
          colId: "100013710",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "OUTSIDENOTE",
          value: "",
          id: "4709-100013710",
          show: true,
          span: 6,
         marginRight:'25%'
        },
        "4709-100013703": {
          name: '客户端电信设备资源(含端口)',
          type: 'select',
          attrRoleCd: "0",
          colId: "100013703",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "TELEDEVICERESOURCE",
          value: "",
          id: "4709-100013703",
          options: [{label: '具备', value: '9005001'}, {label: '不具备', value: '9005002'}],
          required: false,
          show: true,
          span: 6,
        },
        "4709-100013707": {
          type: 'Ipt',
          name: '预计工期(工作日)',
          attrRoleCd: "0",
          colId: "100013707",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "TELDEVICEDATE",
          value: "",
          id: "4709-100013707",
          show: true,
          span: 6
        },
        "4709-100013711": {
          type: 'textarea',
          name: '备注',
          attrRoleCd: "0",
          colId: "100013711",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "TELTRUNKNOTE",
          value: "",
          id: "4709-100013711",
          show: true,
          span: 6,
         marginRight:'25%'
        },
        "4709-100013713": {
          name: '市政问题',
          type: 'select',
          attrRoleCd: "0",
          colId: "100013713",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "CITY_PROBLEM",
          value: "",
          id: "4709-100013713",
          options: [{label: '有', value: '30380001'}, {label: '没有', value: '30380002'}],
          required: false,
          show: true,
          span: 6,
         marginRight:'75%'
        },
        "4709-141000051": {
          name: '资源情况',
          type: 'select',
          attrRoleCd: "0",
          colId: "RESULT",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "RESULT",
          value: "",
          id: "4709-141000051",
          options: [{label: '具备', value: '9005001'}, {label: '不具备', value: '9005002'}],
          required: false,
          show: true,
          span: 6,
        },
        "4709-100013712": {
          type: 'Ipt',
          name: '总预计工期(工作日)',
          attrRoleCd: "0",
          colId: "100013712",
          colType: "T",
          tableName: "ORDER_TASK_ATTR",
          fieldId: "TOTALDATE",
          value: "",
          id: "4709-100013712",
          show: true,
          span: 6
        },
        "4709-100012629": {
          type: 'textarea',
          name: '备注',
          attrRoleCd: "0",
          colId: "TASK_COMMENT",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "TASK_COMMENT",
          value: "",
          id: "4709-100012629",
          show: true,
          span: 6,
         marginRight:'25%'
        },
        "4709-100012611": {
          type: 'date',
          name: '填报期限',
          attrRoleCd: "0",
          colId: "TASK_REQ_DATE",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "TASK_REQ_DATE",
          value: "2020-05-24",
          id: "4709-100012611",
          show: true,
          span: 6
        },
        "4709-100012440": {
          type: 'date',
          name: '填报日期',
          attrRoleCd: "0",
          colId: "TASK_OPR_DATE",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "TASK_OPR_DATE",
          value: "2021-04-25",
          id: "4709-100012440",
          show: true,
          span: 6
        },
        "4709-100012377": {
          type: 'Ipt',
          name: '填报人',
          attrRoleCd: "0",
          colId: "USER_NAME",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "USER_NAME",
          value: "",
          id: "4709-100012377",
          show: true,
          span: 6
        },
        "4709-141000045": {
          type: 'Ipt',
          name: '联系电话',
          attrRoleCd: "0",
          colId: "LINK_TEL",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "LINK_TEL",
          value: "",
          id: "4709-141000045",
          show: true,
          span: 6
        },
        "6491-100011054": {
          type: 'Ipt',
          name: '代维费(月租费)',
          attrRoleCd: "0",
          colId: "AMOUNT",
          colType: "C",
          tableName: "ORD_OFFER_INST_FEE_INFO",
          fieldId: "LOOP_MONEY_MAIN_A",
          value: "0",
          id: "6491-100011054",
          relIds: '141000010;100012610;100010009;100011534;100011056;100011694;100012993;100010007;100010008;100012516;100012632;100012493;100012494',
          acctItemId: '3009000',
          show: true,
          span: 6
        },
        "6491-100014235": {
          name: '是否提供路由图',
          type: 'select',
          attrRoleCd: "0",
          colId: "100014235",
          colType: "T",
          tableName: "ORD_PROD_INST_ATTR",
          fieldId: "ROUTE_FLAG",
          value: 0,
          id: "6491-100014235",
          options: [{label: '是', value: 1}, {label: '否', value: 0}],
          required: false,
          show: true,
          span: 6,
        },
        "6491-141000141": {
          name: '上传电路图',
          type: 'upload',
          value: [],
          id: "6491-141000141",
          required: false,
          show: true,
          span: 12,
        },
        "6491-100011975": {
          type: 'Ipt',
          name: '收费单位(一次性费用)',
          attrRoleCd: "0",
          colId: "CHARGE_ORG_CODE",
          colType: "C",
          tableName: "ACCT_ITEM_ORG",
          fieldId: "ORG_ONCE",
          value: "集团公司",
          id: "6491-100011975",
          show: true,
          span: 6
        },
        "6491-100013366": {
          type: 'Ipt',
          name: '一次性委托收款单位',
          attrRoleCd: "0",
          colId: "CON_CHARGE_ORG_CODE",
          colType: "C",
          tableName: "ACCT_ITEM_ORG",
          fieldId: "TRUST_ORG_ONCE",
          value: "",
          id: "6491-100013366",
          show: true,
          span: 6,
          marginRight:'50%'
        },
        "4560-100013915": {
          name: '资费核实',
          type: 'select',
          attrRoleCd: "0",
          colId: "RESULT",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "RESULT",
          value: "",
          id: "4560-100013915",
          options: [{label: '同意', value: '60050001'}, {label: '不同意', value: '60050002'}],
          required: true,
          show: true,
          span: 6,
        },
        "4560-100012611": {
          type: 'date',
          name: '核实期限',
          attrRoleCd: "0",
          colId: "TASK_REQ_DATEE",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "TASK_REQ_DATE",
          value: "2020-05-24",
          id: "4560-100012611",
          show: true,
          span: 6,
        },
        "4560-100012440": {
          type: 'date',
          name: '核实日期',
          attrRoleCd: "0",
          colId: "TASK_OPR_DATE",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "TASK_OPR_DATE",
          value: "2021-04-25",
          id: "4560-100012440",
          show: true,
          span: 6,
          marginRight:'25%'
        },
        "4560-100012377": {
          type: 'Ipt',
          name: '核实人',
          attrRoleCd: "0",
          colId: "USER_NAME",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "USER_NAME",
          value: "刘新宇",
          id: "4560-100012377",
          show: true,
          span: 6,
        },
        "4560-141000045": {
          type: 'Ipt',
          name: '联系电话',
          attrRoleCd: "0",
          colId: "LINK_TEL",
          colType: "C",
          tableName: "ORDER_TASK",
          fieldId: "LINK_TEL",
          value: "15512345670/11111111",
          id: "4560-141000045",
          show: true,
          span: 6,
          marginRight:'50%'
        },
        "22798-142002263": {
          type: 'Ipt',
          name: '接应地客户经理',
          attrRoleCd: "0",
          colId: "142002263",
          colType: "T",
          tableName: "ORD_PROD_INST_ATTR",
          fieldId: "CUST_MANAGER",
          value: "",
          id: "22798-142002263",
          show: true,
          span: 6,
        },
        "22798-142002265": {
          type: 'Ipt',
          name: '接应地客户经理联系电话',
          attrRoleCd: "0",
          colId: "142002265",
          colType: "T",
          tableName: "ORD_PROD_INST_ATTR",
          fieldId: "CUSTMANAGER_NUMBER",
          value: "",
          id: "22798-142002265",
          show: true,
          span: 6,
        },
        "22798-142002267": {
          type: 'Ipt',
          name: '接应地客户经理邮箱',
          attrRoleCd: "0",
          colId: "142002267",
          colType: "T",
          tableName: "ORD_PROD_INST_ATTR",
          fieldId: "CUSTMANAGER_EMAIL",
          value: "",
          id: "4560-141000045",
          show: true,
          span: 6,
          marginRight:'25%'
        },
      },
      odtals:null
    }
  },
  props: {
    ODKInfo: {
      type: Object
    },
    CTOInfo: {
      type: [Object,Array]
    }
  },
  computed: {
    ...mapState('orders',['orderPosInfo']),
    ...mapState('user',['user'])
  },
  mounted() {

  },
  created() {
    // this.submitFun();
    this.getCustomerOrderDetail(this.Form,this.CTOInfo,this.ODKInfo);
  },
  components: {
    TcForm2
  },
  methods: {
    async submitFun(){
      let base={
        userName: this.user.staffName,
        userId: this.user.staffId,
        orgId: this.user.orgId,
        actType: 'MOD',
        oneOrmany:'one'
      };
      let {userId,orgId} = base,
          {custId,orderItemSeqs,custSoNumber,orderItemIds,orderItemId} = this.CTOInfo,
          {orderAuditId,taskId,activityId,processInstId} = this.ODKInfo;
      let param = requestUtil.paramEnc(this.Form,Object.assign(this.ODKInfo,this.CTOInfo,base,this.odtals));
      let allParam = {orderAuditId,orderItemIds,custId,activityId,processInstId,orderItemSeqs,custSoNumber,orderItemId,userId,orgId,taskId,...base,...param};
      const result = await CustOrderService.saveTariffVerification(allParam);
      try {
        if(result.meta.resultCode == 0){
          this.$message({
            type: 'success',
            message: '保存成功!'
          });
          this.$emit('update:show',false);
        }else{
          this.$message({
            showClose: true,
            message: result.meta.resultMsg,
            type: 'error'
          });
        }
      } catch {
        this.$message({
          showClose: true,
          message: 'code:'+result.code+'  msg:'+result.msg,
          type: 'error'
        });
      }
    },
    closeFun(){
      this.$emit('update:show',false)
    }
  }
}
</script>

<style lang="scss" scoped>
.tariff-verification-box{
  height: 84vh;
  overflow-y: auto;
}
</style>
